<script>
	export default {
		onLaunch: function() {
			// 非开发工具移除 console.log console.info
			if (uni.getSystemInfoSync().platform !== "devtools") {
				console.log = () => {};
				console.info = () => {};
			}
			console.log('App Launch');
			// #ifdef APP-PLUS-NVUE
			// 加载公共图标库
			const domModule = weex.requireModule('dom');
			domModule.addRule('fontFace', {
				fontFamily: 'iconfont',
				src: "url('/static/css/iconfont/iconfont.ttf?t=1674915570627') format('truetype')"
				// 'src': "url('https://at.alicdn.com/t/font_3144908_9z886l11wkp.ttf')  format('truetype')"
			});
			// #endif
		},
		onShow: function() {
			// #ifdef MP-WEIXIN
			if (wx.canIUse('getUpdateManager')) {
				const wxUpdateManager = wx.getUpdateManager();
				wxUpdateManager.onCheckForUpdate((res) => {
					console.log(res);
					if (res.hasUpdate) {
						wxUpdateManager.onUpdateReady(() => {
							wx.showModal({
								title: '更新提示',
								content: '新版本已经准备好，是否重启应用？',
								success: function(res) {
									if (res.confirm) {
										// 新的版本已经下载好，调用 applyUpdate 应用新版本并重启
										wxUpdateManager.applyUpdate();
									}
								}
							})
						})
						wxUpdateManager.onUpdateFailed(() => {
							wx.showModal({
								title: '更新失败',

							})
						})
					}
				})
			}
			// #endif
		},
		onHide: function() {
			console.log('App Hide');
		}
	};
</script>

<style lang="scss">
	@import '@/uni_modules/uview-ui/index.scss';
	/*每个页面公共css */
	@import '/uni.scss';
	@import '/static/css/common.css';
	@import '/static/css/free.css';

	/* #ifdef MP */
	::-webkit-scrollbar {
		display: none;
	}

	// #endif
	/* 在线链接服务仅供平台体验和调试使用，平台不承诺服务的稳定性，企业客户需下载字体包自行发布使用并做好备份。 */
	@font-face {
		font-family: 'iconfont';
		/* Project id 3877150 */
		src: url('//at.alicdn.com/t/c/font_3877150_pamkkmmyyw.woff2?t=1742870956437') format('woff2'),
			url('//at.alicdn.com/t/c/font_3877150_pamkkmmyyw.woff?t=1742870956437') format('woff'),
			url('//at.alicdn.com/t/c/font_3877150_pamkkmmyyw.ttf?t=1742870956437') format('truetype');
	}

	.iconfont {
		font-family: 'iconfont' !important;
		font-size: 38rpx;
		font-style: normal;
		-webkit-font-smoothing: antialiased;
		-moz-osx-font-smoothing: grayscale;
	}

	.ql-blank:before {
		font-style: initial !important;
	}

	.nomore {
		text-align: center;
		color: #9d9d9d;
		font-size: 28rpx;
		padding: 20rpx;
	}

	.huifuBox {
		margin-top: 20rpx;
		display: inherit;

		span {
			display: flex;
			align-items: center;
			padding: 3px 10px;
			border-radius: 20px;
			background-color: #f8f8f8;
			font-size: 24rpx;

			.iconfont {
				font-size: 22rpx;
				margin-left: 3px;
				transform: translateY(1px);
			}
		}
	}

	.width60 {
		width: 60%;
		margin: 0 auto;
		box-shadow: 0 0 3px #ccc;
		border-radius: 20rpx;
		overflow: hidden;
		margin-top: 40rpx;
	}

	// .friend_Page{
	// 	width: 80%;
	// 	margin: 0 auto;
	// 	border: 1px solid #f8f8f8;
	// }

	// /deep/ .friend_Page .u-navbar--fixed{
	// 	width: 80%;
	// 	margin: 0 auto;
	// }

	/deep/ .el-dropdown-link {
		display: flex !important;
		white-space: nowrap;
	}

	/deep/ .u-navbar--fixed {
		position: relative !important;
	}
</style>